package com.testing.redboy.bean;

/**
 * Created by Administrator on 2017/2/23.
 */

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

@Table(name = "product_info", onCreated = "CREATE UNIQUE INDEX index_name ON product_info(gname,images,num,price)")
public class DbInfo {
    @Column(name = "id", isId = true, autoGen = true, property = "NOT NULL")
    private int id;

    @Column(name = "gname")
    private String gname;

    @Column(name = "images")
    private String images;

    @Column(name = "num")
    private String num;

    @Column(name = "price")
    private int price;

    @Column(name = "isPick")
    private boolean isPick;

    public DbInfo(String gname, String images, String num, int price, boolean isPick) {
        this.gname = gname;
        this.images = images;
        this.num = num;
        this.price = price;
        this.isPick = isPick;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }
    //默认的构造方法必须写出，如果没有，这张表是创建不成功的


    public boolean isPick() {
        return isPick;
    }

    public void setPick(boolean pick) {
        isPick = pick;
    }

    public DbInfo() {
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "DbInfo{" +
                "id=" + id +
                ", gname='" + gname + '\'' +
                ", images='" + images + '\'' +
                ", num='" + num + '\'' +
                ", price=" + price +
                ", isPick=" + isPick +
                '}';
    }
}
